<template>
  <basic-container>
    <div class="card-border">
      <card-header :header-data="headerData"></card-header>
      <div class="card-body">
        <avue-crud :data="levyResultData"
                   :option="tableoption"
                   :page="page"
                   :table-loading="tableLoading"
                   @on-load="getResultList"
                   @size-change="sizeChange"
                   @current-change="currentChange"
                   class="avuecrud">
          <template slot-scope="scope" slot="menu">
            <div class="menu-title" @click.stop="viewLevyDeptAll(scope.row,scope.index)">
              <i class="iconfont iconview icon-primary"></i>
              <p class="menu-title-text">反馈结果</p>
            </div>
          </template>
        </avue-crud>
      </div>
    </div>
  </basic-container>
</template>

<script>
  import {subjectTrack} from "@/api/subject";

  export default {
    name: "collectionTrack",
    created() {

    },
    data() {
      return {
        headerData: {
          title: '课题征集跟踪'
        },
        levyResultData: [],
        page: {
          total: 0, // 总页数
          currentPage: 1, // 当前页数
          pageSize: 10 // 每页显示多少条
        },
        tableoption: {
          page: true,
          menuWidth: 120,
          addBtn: false,
          editBtn: false,
          addRowBtn: false,
          indexLabel: "序号",
          index: true,
          cellBtn: false,
          indexWidth:70,
          delBtn: false,
          columnBtn: false,
          refreshBtn: false,
          filterBtn: false,
          searchBtn: false,
          keyId: "id",
          column: [
            {
              label: "规划名称",
              prop: "achievementTitle",
              cell: true
            },
            {
              label: "课题征集主题",
              width: 290,
              prop: "title",
              cell: true
            },
            {
              label: "发起征集部门",
              width: 150,
              prop: "deptName",
              cell: true
            },
            {
              label: "反馈截止时间",
              width: 130,
              prop: "endDate",
              cell: true
            },
          ]
        },
        tableLoading: false,
      }
    },
    methods: {
      viewLevyDeptAll(row) {
        let src = `/levyFeedbackAllList/detail/${row.collectionId}`;
        this.$router.push({
          path: src
        })
      },
      currentChange(currentPage) {
        var page = this.page;
        page.currentPage = currentPage;
        this.getResultList(page);
      },
      sizeChange(pageSize) {
        var page = this.page;
        page.pageSize = pageSize;
        this.getResultList(page);
      },
      getResultList(page) {
      },
    }
  }
</script>

<style lang="scss" scoped>
  .card-body {
    padding: 10px;
    min-height: 400px
  }
</style>

